#tab_txt2img,
#tab_img2img {
  #txt2img_settings,
  #img2img_settings {
    .block.gradio-checkbox {
      margin: 0 !important;
    }

    span.svelte-1gfkn6j:not(.has-info) {
      overflow: hidden;
      width: var(--fill-available);
      margin-right: 12px;
      margin-bottom: var(--spacing-lg);

      text-overflow: ellipsis;
      white-space: nowrap;
    }

    > *:not([id$='_script_container']) {
      margin: 0 !important;
      padding: 12px !important;
      background: var(--panel-background-fill) !important;
      border-radius: var(--container-radius) !important;
    }

    > *:not([id$='_script_container'], #txt2img_seed_row, #mode_img2img) {
      align-items: center;
    }
  }

  #txt2img_gallery {
    overflow: hidden !important;
    border-radius: var(--border-radius) !important;
  }

  [id$='2img_tools'] > div {
    display: flex;
    justify-content: center;

    button {
      max-width: unset !important;
    }
  }

  .image-buttons button {
    min-width: min(160px, 100%) !important;
  }

  #img2img_label_copy_to_img2img {
    display: none;
  }

  #img2img_copy_to_img2img,
  .gap.compact,
  .image-buttons,
  .image_buttons_extras {
    gap: 8px !important;
  }

  [id$='_settings'] {
    div.svelte-15lo0d8 > *,
    div.svelte-15lo0d8 > .form > * {
      flex: 1;
    }
  }

  #script_list {
    margin-top: 0 !important;
    margin-bottom: var(--size-ms) !important;
    padding: 12px !important;

    background-color: var(--color-fill-tertiary) !important;
    border-color: transparent !important;
    border-radius: var(--border-radius) !important;

    transition: all 0.3s ease-in-out !important;
  }

  [id$='_script_container'] {
    .block.svelte-mppz8v:not(
        .livePreview,
        .gradio-gallery,
        .gradio-image,
        .gradio-video,
        .gradio-file
      ) {
      border: unset !important;
    }
  }
}
